<?php if(!defined('EMLOG_ROOT')) {exit('error!');}?>
<div data-role="content" class="contentDiv">
<div class="user" >
<span class="userFloor">
<em><a onclick= "javascript:history.back() " >取消</a></em>
</span>
<?php if($isGravatar == 'y'): ?>
<span class="userAvatar">
<img src="<?php echo getGravatar($mail); ?>">
</span>
<?php endif; ?>
<span class="userName">
<a href=""  data-transition="none"><?php echo $poster; ?></a>
</span>
<br/>
<span class="userBtn">
<a href="" target="_blank rel="nofollow" data-transition="none">主页</a>
<?php if(ISLOGIN === true && $value['author'] == UID || ROLE == 'admin'): ?>
<a href="./?action=delt&id=<?php echo $value['id'];?>" data-transition="none">删除</a>
<?php endif;?>	
</span>
</div>
<div class="pbody">
<div id="postmessage_$post[pid]" class="postmessage"><?php echo preg_replace("/\{smile:(([1-4]?[0-9])|50)\}/",'<img src="'.BLOG_URL.'content/plugins/face/face/$1.gif"  />',$comment);  ?></div>
</div>
<div data-role="content">
<form method="post" action="./index.php?action=addcom&gid=<?php echo $gid; ?>&pid=<?php echo $cid; ?>">
<?php
		if(ISLOGIN == true):
		$CACHE = Cache::getInstance();
		$user_cache = $CACHE->readCache('user');
?>
当前已登录为<b><?php echo $user_cache[UID]['name']; ?></b><br />
	<input type="hidden" name="comname" value="<?php echo $user_cache[UID]['name']; ?>" />
	<input type="hidden" name="commail" value="<?php echo $user_cache[UID]['mail']; ?>" />
	<input type="hidden" name="comurl" value="<?php echo BLOG_URL; ?>" />
	<?php else: ?>
	昵称<br /><input type="text" name="comname" value="" /><br />
	邮件地址 (选填)<br /><input type="text" name="commail" value="" /><br />
	个人主页 (选填)<br /><input type="text" name="comurl" value="" /><br />
	<?php endif; ?>
	内容<br /><textarea name="comment" rows="10"></textarea><br />
	<?php echo $verifyCode; ?><br /><input type="submit" value="发表评论" />
	</form>
</div>